import 'package:thinking/config/_.dart';
import 'package:thinking/entity/_.dart';
import 'package:thinking/http/Dio.dart';
import 'package:dio/dio.dart';
class CountryService{
  static Future<List<Continent>?> getAllCountry({Map<String,dynamic>? params}) async{
    var res = await HttpApi().get(url: Config.apiUrl['ApiList']['getAllCountry'],params: params,options:Options(extra:{'showLoading':true}));
    return CountryEntity.fromJson(res).data;
  }

  static Future<CountryData> getAllTime({Map<String,dynamic>? params}) async{
    var res = await HttpApi().get(url: Config.apiUrl['ApiList']['getAllTime'],params: params,options:Options(extra:{'showLoading':false}));
    return CountryData.fromJson(res['data']);
  }

  static Future<HomeResult> getAllThink({Map<String,dynamic>? params}) async{
    var res = await HttpApi().get(url: Config.apiUrl['ApiList']['getAllThink'],params: params,options:Options(extra:{'showLoading':false}));
    return HomeResult.fromJson(res['data']);
  }
}